CsCAN Protocol
See also: Help for Serial Protocols
Overview
The CsCAN serial downloadable protocol is for communication between peer to peer. This is a Master/Slave protocol.
CsCAN protocol supports master only operation to the slave using the CsCAN protocol. Communication is via the 9 pin ‘D’ type Female connector and RJ45 connector.
Cscape Configuration
To configure OCS for the CsCAN protocol, select the Protocol Configuration from the Program menu in Cscape software. Select the appropriate protocol type on the desired port. To make sure that the Software is able to configure the equipment for the correct protocol, ensure Cscan.dll file is in the Protocols directory of the current working/open Cscape.
Serial Port Configuration
The default link settings for the terminal (fixed) are: 9600 baud, 8 data bits, No parity, 1 stop bit, No handshaking and RS232 communications mode.
Using CsCAN protocol, all register types become available directly over the serial protocol.
Node Address
If used on a 1 to 1 connection to an OCS, the address is set to the same as that of the connected OCS. If not known, this value can be seen from the OCS SYSTEM menu.
Selecting Device Register Type
Click on Program and then select Protocol Config.
Network Configuration
Device Config
Specify slave Name and CsCAN ID.
NOTE: This network ID should be same as set in System Menu of Slave Device.
Enter the desired parameter address in the Device Register field.
Register Ranges
Register Type |
Register Name |
Range |
Data Type |
Analog IN |
%AI |
1-512 |
RW-16 bit Word |
Global Analogue IN |
%AIG |
1-32 |
RW-16 bit Word |
Analogue OUT |
%AQ |
1-512 |
RW-16 bit Word |
Global Analogue OUT |
%AQG |
1-32 |
RW-16 bit Word |
Digital Inputs |
%I |
1-2048 |
RO-Bit or Word |
Global Digital IN |
%IG |
1-64 |
RO–Bit or Word |
Function Keys |
%K |
1-12 |
RO-16 bit Word |
Retentive Coils |
%M |
1-2048 |
RW-Bit or Word |
Output Coils |
%Q |
1-2048 |
RW-Bit or Word |
Global O/P Coils |
%QG |
1-64 |
RW-Bit or Word |
Data Registers |
%R |
1-9999 |
RW-16 bit Word |
System Bits |
%S |
1-16 |
RO-Bit |
System Registers |
%SR |
1-192 |
RO-Word |
Temporary Bit |
%T |
1-2048 |
RW-Bit or Word |
RW=Read/Write RO=Read Only.
NOTE: %R registers are shared with Counters, Timers & general data words. Also if %R registers have been formatted in special ways e.g. Real Numbers, the protocol has no way of knowing this. Therefore care must be taken to match data types to be compatible at both ends.
Network Communication Errors
In order to access the Network statistics, user must assign the “Network status register” in network configuration. The table below gives the details of statistics.
Number | Statistics | Location | Description |
---|---|---|---|
|
|
|
|
1 |
Update interval exceeded count |
%Rx |
This register explains number of times that the actual transaction scan time to complete all transactions exceeded specified update interval. Generally used as an indicator that an excessive number of triggered transfers or failed communication retries are occurring that is lengthening the expected transaction scan time.
If the Update interval is set to zero (update as fast as possible), this 32-bit register alternately specifies the actual transaction scan time in mSec resolution. |
2 |
No response count |
%R(x+2) |
This register explains number of times that a device(s) did not respond to a transaction. This includes ALL failed transaction, not just those after the retry count is exceeded. |
3 |
Corrupt Response Count |
%R(x+4) |
This register explains number of times that a device(s) returned an invalid or failed response to a transaction. This includes ALL failed.
Transaction, not just those after the retry count is exceeded. |
4 |
Valid Response Count |
%R(x+6) |
This register explains total number of valid responses. |
NOTE: %Rx: 32-bit network status register configured in Network configuration. For example: %R500(501).
Device Communication Errors
Error | Error Number | Description |
---|---|---|
INVALID_BLOCK |
-203 |
Invalid size for data type. |
NO_RESPONSE_FROM_PLC |
-204 |
Timeout while waiting for remote node response. |
INVALID_RESPONSE_FROM_PLC |
-205 |
Corrupted response from remote node. |
INVALID_INITIALISATION |
-207 |
Internal Error - Unable to open port. |
Connection Details
Illustrations below show the various end-of-cable connectors required:
25-Pin D-Type Male | 10-Pin Weidmuller
Cage Clamp |
8-Pin RJ 45 Plug | 9-Pin DB Male |
CN1 | CN1 | MJ1/MJ2 | Port 1 |
Following table indicates the Summary of the Serial port pin details for Serial communication. With this information RS-232/485/422 communication cables can be done.
Port 1 — DB9 (Female at OCS end)
MJ1/MJ2 — RJ45 (Female at OCS end)
CN1 — 10-Pin Weidmuller Cage Clamp (Female at OCS end)
CN1 — DB25 (Female at OCS end)
NOTES:
-
Do not connect to unlisted pins.
-
Recommended Cable: Beldon 9503, twisted multipair, screened.
-
Connect the screens together at the shield / earth pin of the PLC.
Port 1 — DB9 (Female at OCS end)
MJ1/MJ2 — RJ45 (Female at OCS end)
CN1 — 10-Pin Weidmuller Cage Clamp (Female at OCS end)
CN1 — DB25 (Female at OCS end)
NOTES:
-
Do not connect to unlisted pins.
-
Recommended Cable: Beldon 9503, twisted multipair, screened.
-
Connect the screens together at the shield / earth pin of the PLC.